<template>
<div id="inventory-management">
  <el-form-item class="warpper">
    <div class="titleBtn">
        <div class="btn">
            <div class="patch-edit" v-if="setinventory">
                <el-button @click="batchSetting">批量设置库存房量</el-button>
            </div>
        </div>
        <div class="bacth-l">
          <div class="batch-edit">
            <el-dialog title="批量设置库存房量" :visible.sync="buttonFormVisible" width="50%" @close="patchEditClose">
              <div class="room-name">
                <el-form-item label="房型名称">
                    <el-checkbox v-model="settingRoomcheckAll" @change="staticRoomsCheckAllChange">全选</el-checkbox>
                    <div style="margin: 12px 0;"></div>
                    <div class="room-check" v-for="(room, index) in staticRooms">
                        <div class="room-check-warpper">
                            <div class="room-check-all">
                                <el-checkbox v-model="staticRoomsCheck[index].parent" @change="staticRoomsCheckChange(room, index)">{{room.roomName}}</el-checkbox>
                            </div>
                            <div class="room-check-child">
                                <div v-for="sale in room.saleRooms">
                                    <el-checkbox-group v-model="staticRoomsCheck[index].children" @change="staticRoomsChecked(room, sale.id, index)">
                                        <el-checkbox :label="sale.id" :key="sale.id">{{sale.roomName}}</el-checkbox>
                                    </el-checkbox-group>
                                </div>
                            </div>
                        </div>
                    </div>
                </el-form-item>
              </div>
              <div class="select-warpper">
                <div class="select-day" v-for="(num, index) in editSaleRoomPatch.dateRanges">
                    <el-form-item label="选择日期" style="margin-bottom: 20px;">
                        <el-col :span="4">
                        <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="num.dateSpan.start" style="width: 100%;" :picker-options="pickerOptions"></el-date-picker>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center">至</el-col>
                        <el-col :span="4">
                        <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="num.dateSpan.end" style="width: 100%;" :picker-options="pickerOptions"></el-date-picker>
                        </el-col>
                    </el-form-item>
                    <el-form-item label="选用星期">
                        <div class="check-all-week" style="line-height: 34px;">
                            <el-checkbox v-model="num.parent" @change="handleWeekRoomAll(num.parent, index)">全选</el-checkbox>
                        </div>
                        <div class="check-week-right">
                            <el-checkbox-group v-model="num.weeks" @change="handleWeekRoomCheckAll(num.weeks, index)">
                                <el-checkbox :label="7" name="type">日</el-checkbox>
                                <el-checkbox :label="1" name="type">一</el-checkbox>
                                <el-checkbox :label="2" name="type">二</el-checkbox>
                                <el-checkbox :label="3" name="type">三</el-checkbox>
                                <el-checkbox :label="4" name="type">四</el-checkbox>
                                <el-checkbox :label="5" name="type">五</el-checkbox>
                                <el-checkbox :label="6" name="type">六</el-checkbox>
                            </el-checkbox-group>
                        </div>
                    </el-form-item>
                    <div class="addBtn">
                            <div class="btn-left">
                                <el-button type="text" @click="batchAdd(index)">增加时间段</el-button>
                            </div>
                            <div class="btn-right">
                                <el-button type="text" @click="batchDelete(index)" v-if="index !== 0">删除时间段</el-button>
                            </div>
                        </div>
                </div>
              </div>
                <el-form-item style="margin-top: 30px;">
                    <div class="batch-l">
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">包房</label>
                            </div>
                            <el-select v-model="editSaleRoomPatch.operator">
                                <el-option label="不变" :value="null"></el-option>
                                <el-option label="加房" :value="0"></el-option>
                                <el-option label="减房" :value="1"></el-option>
                                <el-option label="等于" :value="2"></el-option>
                            </el-select>
                            <el-input v-model.number="editSaleRoomPatch.instantQuantity" auto-complete="off" placeholder="间数"></el-input>
                        </div>
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">合约房</label>
                            </div>
                            <el-select v-model="editSaleRoomPatch.enquireOperator">
                                <el-option label="不变" :value="null"></el-option>
                                <el-option label="加房" :value="0"></el-option>
                                <el-option label="减房" :value="1"></el-option>
                                <el-option label="等于" :value="2"></el-option>
                            </el-select>
                            <el-input v-model.number="editSaleRoomPatch.enquireQuantity" auto-complete="off" placeholder="间数"></el-input>
                        </div>
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">售完自动关房</label>
                            </div>
                            <el-select v-model="editSaleRoomPatch.autoClose">
                                <el-option label="是" :value="1"></el-option>
                                <el-option label="否" :value="0"></el-option>
                            </el-select>
                        </div>
                    </div>
                </el-form-item>
                <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="batchEditRoomState">确认</el-button>
                <el-button @click="buttonFormVisible = false">取消</el-button>
                </div>
           </el-dialog>
          </div>
        </div>
    </div>
    <div class="calendar">
        <div class="select">
            <el-select v-model="weekOrMouth" @change="weekChange">
                <el-option label="按周" value="按周"></el-option>
                <el-option label="按月" value="按月"></el-option>
            </el-select>
        </div>
        <div class="left-btn">
            <el-button @click="beforeWeek">前一周</el-button>
        </div>
        <div class="date">
            <el-date-picker
                v-model="defaultValue.startDate"
                type="date"
                :picker-options="pickerOptions"
                @change="dateChange"
                value-format="yyyy-MM-dd"
                placeholder="选择日期">
            </el-date-picker>
        </div>
        <div class="right-btn">
            <el-button @click="afterWeek">后一周</el-button>
        </div>
    </div>
  </el-form-item> 
  <el-form-item>
    <div class="calendar-list">
        <div class="calendar-header">
            <div class="calendar-header-warpper">
                <div class="item" v-for="(num, index) in calendarData">
                    <el-checkbox :key="num" v-if="index === 0" v-model="calendarAll" @change="calendarCheckChange"></el-checkbox>
                    <label>{{num}}</label>
                </div>
            </div>
        </div>
        <div class="calendar-body" ref="calendarBody">
            <div class="calendar-body-warpper">
                <div class="calendar-warpper-content">
                <div class="calendar-content" v-for="(data, index) in RoomtableData">
                    <div class="calendar-content-module">
                        <div class="physics">
                            <el-checkbox :label="data.id" :key="data.id" @change="handleCheckedRoomTableChange(data, index)" v-model="calendarCheckAll[index].parent">{{data.roomName}}</el-checkbox><br />
                            <!-- <el-button type="text" @click="addSellingHouse(data)">新增售卖房型</el-button> -->
                        </div>
                        <div class="date-information">
                            <div class="date-warpper">
                                <div class="sale-room-title">
                                    <div class="sale-room-title-item" v-for="(item, numLine) in data.saleRoomEntities">
                                        <div class="sale-title-content">
                                            <el-checkbox-group v-model="calendarCheckAll[index].children" @change="handleCheckedRoomNameChange(data, item.id, index)">
                                                <el-checkbox :label="item.id" :key="item.id">{{item.roomName}}</el-checkbox>
                                            </el-checkbox-group>
                                            <!-- <el-button type="text" @click="saleRoomEdits(item, numLine)">修改</el-button>
                                            <el-button type="text" @click="deleteSaleRoom(item.id)">删除</el-button> -->
                                        </div>
                                        <div class="sale-date" :class="{'up-style': item.status === '上线'}">
                                            <div class="item" v-for="num in item.productEntities">
                                                <div class="item-content">
                                                    <div class="item-child" :class="{'warpper-second': num.status === '关' && item.status === '下线', 'warpper-first': num.status === '满' && item.status === '下线', 'warpper-third': num.status === '' && item.status === '下线'}">
                                                        <div class="item-text">
                                                        <label :class="{'down-style': item.status === '上线'}">{{num.breakfast}}</label>&nbsp<label :class="{'down-style': item.status === '上线'}">{{num.date.substring(5)}}</label><br />
                                                       <label :class="{'down-style': item.status === '上线'}">￥</label><label :class="{'down-style': item.status === '上线', 'red': item.status === '下线'}">{{num.salePrice}}</label><br />
                                                        <label :class="{'down-style': item.status === '上线'}">{{num.usedQuantity}}/{{num.totalQuantity}}</label>
                                                        <div class="manchu" v-if="num.status === '满' && item.status === '下线'">满</div>
                                                        <div class="closed" v-if="num.status === '关' && item.status === '下线'">关</div>
                                                      </div>
                                                    </div>
                                                </div>  
                                            </div>
                                        </div>
                                        <div class="operation">
                                            <el-button type="text" @click="saleRoomEditLineShow(item, numLine)" v-if="setinventory">修改</el-button>
                                            <el-button type="text" @click="stateSwitch(item)" v-if="updatesaleroomstatus">{{item.status}}</el-button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>
        <div class="calendar-foot"></div>
    </div>
  </el-form-item>
        <el-form-item style="margin: 20px 0;" class="foot-pagination">
            <el-pagination
                @size-change="handleRoomSizeChange"
                @current-change="handleRoomCurrentChange"
                :current-page="RoomCurrentPage"
                :page-sizes="[5, 10]"
                :page-size="RoomPageSize"
                layout="total, prev , pager , next, sizes, jumper"
                :total="RoomTotal">
            </el-pagination>    
        </el-form-item>
        <div class="edit-sale-room">
            <el-dialog title="修改库存房量" :visible.sync="saleRoomEditLine" width="50%" @close="patchEditClose">
              <div class="room-name">
                <el-form-item label="房型名称" label-width="60">
                    <el-input
                    v-model="saleRoomEditName"
                    :disabled="true">
                    </el-input>
                </el-form-item>
              </div>
              <div class="select-warpper">
                <div class="select-day" v-for="(num, index) in editSaleRoomNumbers.dateRanges">
                    <el-form-item label="选择日期" style="margin-bottom: 20px;" label-width="60">
                        <el-col :span="4">
                        <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="num.dateSpan.start" style="width: 100%;" :picker-options="pickerOptions"></el-date-picker>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center">至</el-col>
                        <el-col :span="4">
                        <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="选择日期" v-model="num.dateSpan.end" style="width: 100%;" :picker-options="pickerOptions"></el-date-picker>
                        </el-col>
                    </el-form-item>
                    <el-form-item label="选用星期">
                        <div class="check-all-week" style="line-height: 34px;">
                            <el-checkbox v-model="num.parent" @change="handleWeekRoom(num.parent, index)">全选</el-checkbox>
                        </div>
                        <div class="check-week-right">
                            <el-checkbox-group v-model="num.weeks" @change="handleWeekRoomCheck(num.weeks, index)">
                                <el-checkbox :label="7" name="type">日</el-checkbox>
                                <el-checkbox :label="1" name="type">一</el-checkbox>
                                <el-checkbox :label="2" name="type">二</el-checkbox>
                                <el-checkbox :label="3" name="type">三</el-checkbox>
                                <el-checkbox :label="4" name="type">四</el-checkbox>
                                <el-checkbox :label="5" name="type">五</el-checkbox>
                                <el-checkbox :label="6" name="type">六</el-checkbox>
                            </el-checkbox-group>
                        </div>
                    </el-form-item>
                    <div class="addBtn">
                            <div class="btn-left">
                                <el-button type="text" @click="saleRoomNumbershAdd(index)">增加时间段</el-button>
                            </div>
                            <div class="btn-right">
                                <el-button type="text" @click="saleRoomNumbershDelete(index)" v-if="index !== 0">删除时间段</el-button>
                            </div>
                        </div>
                </div>
              </div>
                <el-form-item style="margin-top: 30px;">
                    <div class="batch-l">
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">包房</label>
                            </div>
                            <el-select v-model="editSaleRoomNumbers.operator">
                                <el-option label="不变" :value="null"></el-option>
                                <el-option label="加房" :value="0"></el-option>
                                <el-option label="减房" :value="1"></el-option>
                                <el-option label="等于" :value="2"></el-option>
                            </el-select>
                            <el-input v-model.number="editSaleRoomNumbers.instantQuantity" auto-complete="off" placeholder="间数"></el-input>
                        </div>
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">合约房</label>
                            </div>
                            <el-select v-model="editSaleRoomNumbers.enquireOperator">
                                <el-option label="不变" :value="null"></el-option>
                                <el-option label="加房" :value="0"></el-option>
                                <el-option label="减房" :value="1"></el-option>
                                <el-option label="等于" :value="2"></el-option>
                            </el-select>
                            <el-input v-model.number="editSaleRoomNumbers.enquireQuantity" auto-complete="off" placeholder="间数"></el-input>
                        </div>
                        <div class="batch-edit">
                            <div class="top" style="font-size: 12px; color: rgb(219, 225, 230)">
                                <label style="color: rgb(57, 71, 86);">售完自动关房</label>
                            </div>
                            <el-select v-model="editSaleRoomNumbers.autoClose">
                                <el-option label="是" :value="1"></el-option>
                                <el-option label="否" :value="0"></el-option>
                            </el-select>
                        </div>
                    </div>
                </el-form-item>
                <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="saleRoomEditLineBtn">确认</el-button>
                <el-button @click="saleRoomEditLine = false">取消</el-button>
                </div>
           </el-dialog>
        </div>
    </div>
</template>
<script>
import { updateInventory, updateBacthInventory, getProductQuery, saleRoomToggle, getDateProduct, getAllRooms } from '../../../public/js/saleRoom'
export default {
  props: ['dataTable'],
  name: 'InventoryManagement',
  data () {
    return {
      isIndeterminate: true,
      buttonFormVisible: false,
      addFormVisible: false,
      addSellingHouseType: false,
      patchPrice: false,
      patchSetting: false,
      patchPosted: false,
      editRooms: false,
      saleRoomEdit: false,
      saleRoomEditLine: false,
      addRoomData: [],
      physicsRoomName: '',
      calendar: true,
      calendarCheckAll: [],
      priceTable: [],
      patchPriceTable: [],
      distributors: '',
      SaleRoomRulesUpdateRequest: {},
      bedTypeEntities: [],
      calendarData: ['物理房型', '售卖房型', '周日', '周一', '周二', '周三', '周四', '周五', '周六', '操作'],
      editPriceData: ['物理房型', '适用日期', '适用星期', '采购价', '美团', '易旅'],
      calendarAll: [],
      pickerOptions: {
        disabledDate: function disabledDate (time) {
          return time.getTime() < Date.now() - 8.64e7
        }
      },
      weekData: [{children: []}],
      priceAddPatch: [
        {name: ''}
      ],
      editPriceState: 0,
      addRoomCheck: false,
      addRoomCheckArray: [],
      roomTableArray: [],
      RoomNameArray: [],
      valueTime: '',
      hour: ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24'],
      minute: ['00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55'],
      optionLabel: '不变',
      dialogFormVisible: false,
      weekOrMouth: '按周',
      checkNum: '',
      items: {name: '不变'},
      saleRoomPrices: [{
        saleRoomId: '',
        pricesEntities: [{
          dateRange: {
            dateSpan: {
              start: '',
              end: ''
            },
            weeks: []
          },
          purchasePrice: '',
          priceOperator: '',
          salePrice: ''
        }]
      }],
      RoomtableData: [],
      RoomPageSize: 10,
      RoomCurrentPage: 1,
      RoomTotal: 0,
      checkedCities: ['上海', '北京'],
      currentPage: 'first',
      checkAll: false,
      settingRoomcheckAll: [],
      defaultValue: {
        timestamp: 0,
        version: 'string',
        operation: 'string',
        pageSize: 10,
        pageNum: 1,
        supplierId: '',
        saleHotelId: '',
        startDate: window.commo.time(),
        limitDays: 7
      },
      RoomSendValue: {
        timestamp: 0,
        version: 'string',
        operation: 'string'
      },
      saleRoomIds: [],
      staticRoomIds: [],
      staticRooms: [],
      saleRoomPopover: [],
      staticRoomPopover: [],
      total: 0,
      threeLayersData: [],
      threeLayersDataSeconde: [],
      numArray: 0,
      numArraySeconde: 0,
      numArrayThrid: 0,
      numArrayZero: 0,
      staticRoomsCheck: [],
      sendRoomUpadate: {
        dateRange: {
          dateSpan: {
          },
          weeks: []
        }
      },
      editSaleRoomPatch: {
        dateRanges: [{
          dateSpan: {
            start: '',
            end: ''
          },
          weeks: []
        }]
      },
      editSaleRoomNumbers: {
        dateRanges: [{
          dateSpan: {
            start: '',
            end: ''
          },
          weeks: [],
          parent: false
        }]
      },
      supplierNames: [],
      physicsBedTypeEntities: [],
      physicsStaticRoomId: 0,
      editPhysicsRoomName: '',
      editRoomsSupplierNames: [],
      eidtBedTypeEntities: [],
      editSaleRoomId: 0,
      saleRoomEditName: '',
      status: '',
      state: [],
      stateNumbers: 0,
      priceAll: false,
      test: [],
      elementHeight: 0,
      data: []
    }
  },
  created () {
    window.commo.showMenu(this)
  },
  watch: {
    dataTable: {
      handler (val, old) {
        this.staticRoomPopover = []
        this.threeLayersData = []
        this.calendarCheckAll = []
        this.RoomtableData = val
        if (this.RoomtableData.length > 0) {
          this.RoomtableData.forEach((item, index) => {
            this.calendarCheckAll.push({parent: false, children: []})
            if (item.saleRoomEntities) {
              this.threeLayersData.push(item.saleRoomEntities)
            }
          })
          if (this.RoomtableData[0].saleRoomEntities) {
            if (this.RoomtableData[0].saleRoomEntities.length > 0) {
              if (this.RoomtableData[0].saleRoomEntities[0].productEntities) {
                if (this.RoomtableData[0].saleRoomEntities[0].productEntities.length > 0) {
                  this.RoomtableData[0].saleRoomEntities[0].productEntities.forEach((item, index) => {
                    if (index < 7) {
                      this.calendarData[index + 2] = item.week
                    }
                  })
                }
              }
            }
          }
        }
      },
      deep: true
    }
  },
  mounted () {
    window.bus.$on('starDate', res => {
      this.defaultValue.startDate = res
    })
    // window.bus.$on('InventoryData', res => {
    //   this.staticRoomPopover = []
    //   this.threeLayersData = []
    //   this.calendarCheckAll = []
    //   this.RoomtableData = res
    //   if (this.RoomtableData.length > 0) {
    //     this.RoomtableData.forEach((item, index) => {
    //       this.calendarCheckAll.push({parent: false, children: []})
    //       if (item.saleRoomEntities) {
    //         this.threeLayersData.push(item.saleRoomEntities)
    //       }
    //     })
    //     if (this.RoomtableData[0].saleRoomEntities) {
    //       if (this.RoomtableData[0].saleRoomEntities.length > 0) {
    //         if (this.RoomtableData[0].saleRoomEntities[0].productEntities) {
    //           if (this.RoomtableData[0].saleRoomEntities[0].productEntities.length > 0) {
    //             this.RoomtableData[0].saleRoomEntities[0].productEntities.forEach((item, index) => {
    //               if (index < 7) {
    //                 this.calendarData[index + 2] = item.week
    //               }
    //             })
    //           }
    //         }
    //       }
    //     }
    //   }
    // })
    window.bus.$on('SaleInformation', res => {
      this.defaultValue.supplierId = res.supplierId
      this.defaultValue.saleHotelId = res.saleHotelId
      this.RoomTotal = this.total = res.total
    })
    // window.bus.$on('WindowStyle', res => {
    //   if (res) {
    //     if ((this.$refs.calendarBody.clientHeight - 256) > 0) this.$refs.calendarBody.style.maxHeight = (this.$refs.calendarBody.clientHeight - 256) + 'px'
    //   } else {
    //     if (this.$refs.calendarBody.clientHeight < 256) this.$refs.calendarBody.style.maxHeight = (this.$refs.calendarBody.clientHeight + 256) + 'px'
    //   }
    //   window.bus.$emit('StyleChangeB', this.$refs.calendarBody.style.maxHeight)
    // })
    // window.bus.$on('StyleChangeA', res => {
    //   this.$refs.calendarBody.style.maxHeight = res
    // })
    window.bus.$on('limitDays', res => {
      if (res === 7) this.weekOrMouth = '按周'
      if (res === 30) this.weekOrMouth = '按月'
    })
  },
  methods: {
    dataSet (data) {
      this.calendarCheckAll = []
      if (data.length > 0) {
        data.forEach((item, index) => {
          this.calendarCheckAll.push({parent: false, children: []})
          if (item.saleRoomEntities) {
            this.threeLayersData.push(item.saleRoomEntities)
            if (item.saleRoomEntities.length > 0) {
              item.saleRoomEntities.forEach(value => {
                if (value.productEntities) {
                  if (value.productEntities.length > 0) {
                    value.productEntities.forEach(key => {
                      key.date = key.date.substr(5)
                    })
                  }
                }
              })
            }
          }
        })
        if (data[0].saleRoomEntities) {
          if (data[0].saleRoomEntities.length > 0) {
            if (data[0].saleRoomEntities[0].productEntities) {
              if (data[0].saleRoomEntities[0].productEntities.length > 0) {
                data[0].saleRoomEntities[0].productEntities.forEach((item, index) => {
                  if (index < 7) {
                    this.calendarData[index + 2] = item.week
                  }
                })
              }
            }
          }
        }
      }
    },
    patchEditClose () {
      this.staticRoomsCheck.forEach((item, index) => {
        item.parent = false
        item.children = []
      })
      for (let i in this.editSaleRoomPatch) {
        if (i !== 'dateRanges') {
          this.editSaleRoomPatch[i] = ''
        }
      }
      for (let i in this.editSaleRoomNumbers) {
        if (i !== 'dateRanges') {
          this.editSaleRoomNumbers[i] = ''
        }
      }
      this.editSaleRoomPatch.dateRanges = []
      this.editSaleRoomPatch.dateRanges.push({dateSpan: {start: '', end: ''}, weeks: [], parent: false})
      this.editSaleRoomNumbers.dateRanges = []
      this.editSaleRoomNumbers.dateRanges.push({dateSpan: {start: '', end: ''}, weeks: [], parent: false})
      this.sendRoomUpadate = {dateRange: {dateSpan: {}, weeks: []}}
      this.calendarCheckAll.forEach(item => {
        item.parent = false
        item.children = []
      })
      this.SaleRoomRulesUpdateRequest = {}
      this.patchPriceTable = []
      this.addRoomCheckArray = []
      this.settingRoomcheckAll = false
      this.calendarAll = false
      this.checkAll = false
      this.sendWeekRoom = false
      this.priceAll = false
    },
    /* 批量房态/单个房型修改星期全选 */
    handleWeekRoom (val, index) {
      if (val) {
        [1, 2, 3, 4, 5, 6, 7].forEach(item => {
          this.editSaleRoomNumbers.dateRanges[index].weeks.push(item)
        })
      } else {
        this.editSaleRoomNumbers.dateRanges[index].weeks = []
      }
      this.editSaleRoomNumbers.dateRanges[index].weeks = Array.from(new Set(this.editSaleRoomNumbers.dateRanges[index].weeks))
    },
    /* 批量房态/单个房型修改星期单选 */
    handleWeekRoomCheck (val, index) {
      if (val.length === 7) {
        this.editSaleRoomNumbers.dateRanges[index].parent = true
      } else {
        this.editSaleRoomNumbers.dateRanges[index].parent = false
      }
    },
    /* 批量房态/批量房型修改星期单选 */
    handleWeekRoomAll (val, index) {
      if (val) {
        [1, 2, 3, 4, 5, 6, 7].forEach(item => {
          this.editSaleRoomPatch.dateRanges[index].weeks.push(item)
        })
      } else {
        this.editSaleRoomPatch.dateRanges[index].weeks = []
      }
      this.editSaleRoomPatch.dateRanges[index].weeks = Array.from(new Set(this.editSaleRoomPatch.dateRanges[index].weeks))
    },
    /* 批量房态/批量房型修改星期单选 */
    handleWeekRoomCheckAll (val, index) {
      if (val.length === 7) {
        this.editSaleRoomPatch.dateRanges[index].parent = true
      } else {
        this.editSaleRoomPatch.dateRanges[index].parent = false
      }
    },
    /* 重置勾选值 */
    resetSelectValue (data) {
      this.threeLayersData = []
      this.threeLayersDataSeconde = []
      this.calendarAll = false
      this.settingRoomcheckAll = false
      this.calendarCheckAll.forEach((item, index) => {
        item.parent = false
        item.children = []
      })
      this.staticRoomsCheck.forEach((item, index) => {
        item.parent = false
        item.children = []
      })
      this.staticRooms.forEach(item => {
        this.threeLayersDataSeconde.push(item.saleRooms)
      })
    },
    /* 修改库存房量展示按钮 */
    saleRoomEditLineShow (data, index) {
      this.saleRoomEditName = data.roomName
      this.sendRoomUpadate.saleRoomId = data.id
      this.saleRoomEditLine = true
    },
    /* 修改库存房量保存按钮 */
    saleRoomEditLineBtn () {
      this.editSaleRoomNumbers.saleRoomIds = []
      new Promise((resolve, reject) => {
        resolve(
          this.editSaleRoomNumbers.dateRanges.forEach(item => {
            delete item.parent
          })
        )
      }).then(() => {
        this.editSaleRoomNumbers.saleRoomIds.push(this.sendRoomUpadate.saleRoomId)
        updateInventory(this.editSaleRoomNumbers, this.defaultValue).then(res => {
          if (res.data.errCode === 0) {
            this.$message({
              message: '房型修改成功',
              type: 'success'
            })
            this.RoomtableData = res.data.staticRoomEntities
            this.dataSet(this.RoomtableData)
            this.resetSelectValue()
            this.saleRoomEditLine = false
          }
        })
      })
    },
    /* 上下线状态切换 */
    stateSwitch (data) {
      if (data.status === '上线') this.status = 0
      if (data.status === '下线') this.status = 1
      this.$confirm('确定切换房型状态?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
      }).then(() => {
        saleRoomToggle(this.status, data.id, this.defaultValue).then(res => {
          if (res.data.errCode === 0) {
            this.RoomtableData = res.data.staticRoomEntities
            this.dataSet(this.RoomtableData)
            this.resetSelectValue()
            this.$message.success('状态修改成功')
          }
        })
      })
    },
    /* 时间按钮 */
    dateChange (val) {
      this.defaultValue.startDate = val
      window.bus.$emit('starDate', val)
      getProductQuery(this.defaultValue).then(res => {
        this.RoomtableData = res.data.staticRoomEntities
        this.dataSet(this.RoomtableData)
        this.resetSelectValue()
        for (let i = 0; i < 7; i++) {
          this.calendarData[i + 2] = res.data.staticRoomEntities[0].saleRoomEntities[0].productEntities[i].week
        }
      })
    },
    /* 周月按钮 */
    weekChange (val) {
      if (val === '按周') this.defaultValue.limitDays = 7
      if (val === '按月') this.defaultValue.limitDays = 30
      if (!this.defaultValue.startDate) delete this.defaultValue.startDate
      window.bus.$emit('limitDays', this.defaultValue.limitDays)
      getProductQuery(this.defaultValue).then(res => {
        if (res.data.errCode === 0) {
          this.RoomtableData = res.data.staticRoomEntities
          this.dataSet(this.RoomtableData)
        }
        this.resetSelectValue()
      })
    },
    handleWeekChange (mode) {
      this.defaultValue.limitDays = 7
      window.bus.$emit('limitDays', this.defaultValue.limitDays)
      getDateProduct(this.defaultValue, mode).then(res => {
        if (res.status === 200) {
          this.defaultValue.startDate = res.data
          getProductQuery(this.defaultValue).then(res => {
            if (res.data.errCode === 0) {
              this.RoomtableData = res.data.staticRoomEntities
              this.dataSet(this.RoomtableData)
            }
            this.resetSelectValue()
          })
        }
      })
    },
    /* 前一周按钮 */
    beforeWeek () {
      this.handleWeekChange(0)
    },
    /* 后一周按钮 */
    afterWeek () {
      this.handleWeekChange(1)
    },
    addPriceTime (index) {
      this.patchPriceTable[index].saleRoomPrices.push({
        pricesEntities: [{
          dateRange: {
            dateSpan: {
              start: '',
              end: ''
            },
            weeks: []
          },
          purchasePrice: '',
          priceOperator: '',
          salePrice: ''
        }]
      })
    },
    deletePriceTime (index) {
      this.patchPriceTable[index].saleRoomPrices.splice(index, 1)
    },
    tickerStateData (staticData, saleData) {
      staticData = []
      saleData = []
      for (let i = 0; i < this.calendarCheckAll.length; i++) {
        if (this.calendarCheckAll[i].parent) {
          staticData.push(this.RoomtableData[i].id)
          if (this.RoomtableData[i].saleRoomEntities) {
            this.RoomtableData[i].saleRoomEntities.forEach(item => {
              saleData.push(item.id)
            })
          }
        } else {
          if (this.calendarCheckAll[i].children.length > 0) {
            staticData.push(this.RoomtableData[i].id)
            this.calendarCheckAll[i].children.forEach(item => {
              saleData.push(item)
            })
          }
        }
      }
      let value = {
        staticRoom: staticData,
        saleRoom: saleData
      }
      return value
    },
    /* 批量修改库存弹窗展示按钮 */
    batchSetting () {
      const stateData = this.tickerStateData(this.staticRoomPopover, this.saleRoomPopover)
      this.buttonFormVisible = true
      this.staticRooms = []
      this.threeLayersDataSeconde = []
      this.staticRoomPopover = []
      this.saleRoomPopover = []
      getAllRooms(this.RoomSendValue, stateData, this.defaultValue).then(res => {
        this.staticRooms = res.data.staticRooms
        this.staticRooms.forEach(item => {
          this.staticRoomsCheck.push({parent: false, children: []})
          this.threeLayersDataSeconde.push(item.saleRooms)
        })
        this.settingRoomcheckAll = true
        this.staticSetSelectAll(true)
      })
    },
    /* 批量修改库存保存按钮 */
    batchEditRoomState () {
      this.editSaleRoomPatch.saleHotelId = this.defaultValue.saleHotelId
      this.editSaleRoomPatch.saleRoomIds = this.saleRoomPopover
      delete this.editSaleRoomPatch.saleHotelId
      this.editSaleRoomPatch.dateRanges.forEach(item => {
        delete item.parent
      })
      updateBacthInventory(this.RoomSendValue, this.editSaleRoomPatch, this.defaultValue).then(res => {
        if (res.data.errCode === 0) {
          this.RoomtableData = res.data.staticRoomEntities
          this.dataSet(this.RoomtableData)
          this.$message.success('修改成功')
          this.buttonFormVisible = false
        }
        this.resetSelectValue(this.RoomtableData)
      })
    },
    batchAdd () {
      this.editSaleRoomPatch.dateRanges.push({dateSpan: {start: '', end: ''}, weeks: []})
    },
    batchDelete (index) {
      this.editSaleRoomPatch.dateRanges.splice(index, 1)
    },
    saleRoomNumbershAdd (index) {
      this.editSaleRoomNumbers.dateRanges.push({dateSpan: {start: '', end: ''}, weeks: [], parent: false})
    },
    saleRoomNumbershDelete (index) {
      this.editSaleRoomNumbers.dateRanges.splice(index, 1)
    },
    handleCheckedCitiesChange () {},
    /* 列表全选按钮 */
    calendarCheckChange (val) {
      for (let i = 0; i < this.calendarCheckAll.length; i++) {
        if (val) {
          this.calendarCheckAll[i].parent = true
          if (this.threeLayersData[i].length > 0) {
            this.threeLayersData[i].forEach(item => {
              this.calendarCheckAll[i].children.push(item.id)
            })
          }
        } else {
          this.calendarCheckAll.forEach((item, index) => {
            this.calendarCheckAll[index].parent = false
            this.calendarCheckAll[index].children = []
          })
        }
      }
    },
    /* 售卖房型勾选按钮 */
    handleCheckedRoomNameChange (data, item, index) {
      if (this.calendarCheckAll[index].children.length === data.saleRoomEntities.length) {
        this.calendarCheckAll[index].parent = true
        this.numArrayThrid++
        if (this.numArrayThrid === this.calendarCheckAll.length) this.calendarAll = true
      } else {
        this.numArrayThrid--
        this.calendarAll = false
        this.calendarCheckAll[index].parent = false
      }
    },
    /* 物理房型勾选按钮 */
    handleCheckedRoomTableChange (data, index) {
      if (this.calendarCheckAll[index].parent) {
        this.numArray++
        data.saleRoomEntities.forEach(item => {
          this.calendarCheckAll[index].children.push(item.id)
        })
        if (this.numArray === this.calendarCheckAll.length) this.calendarAll = true
      } else {
        if (this.numArray.length > 1) {
          this.numArray--
          this.calendarAll = false
        } else {
          this.numArray = 0
        }
        this.calendarCheckAll[index].children = []
      }
    },
    staticSetSelectAll (val) {
      for (let i = 0; i < this.staticRoomsCheck.length; i++) {
        if (val) {
          this.staticRoomsCheck[i].parent = true
          this.staticRoomPopover.push(this.staticRoomIds[i])
          if (this.threeLayersDataSeconde[i].length > 0) {
            this.threeLayersDataSeconde[i].forEach(item => {
              this.staticRoomsCheck[i].children.push(item.id)
              this.saleRoomPopover.push(item.id)
            })
          }
        } else {
          this.staticRoomsCheck[i].parent = false
          this.staticRoomsCheck[i].children = []
          this.staticRoomPopover = []
          this.saleRoomPopover = []
        }
      }
    },
    /* 弹窗全选按钮 */
    staticRoomsCheckAllChange (val) {
      this.staticSetSelectAll(val)
    },
    /* 弹窗物理房型按钮 */
    staticRoomsCheckChange (data, index) {
      if (this.staticRoomsCheck[index].parent) {
        this.numArraySeconde++
        data.saleRooms.forEach(item => {
          this.staticRoomsCheck[index].children.push(item.id)
          this.saleRoomPopover.push(item.id)
        })
        if (this.numArraySeconde === this.staticRoomsCheck.length) this.settingRoomcheckAll = true
        this.staticRoomPopover.push(data.id)
      } else {
        if (this.numArraySeconde > 1) {
          this.numArraySeconde--
          this.settingRoomcheckAll = false
        } else {
          this.numArraySeconde = 0
        }
        this.staticRoomsCheck[index].children = []
      }
    },
    /* 弹窗售卖房型按钮 */
    staticRoomsChecked (data, item, index) {
      if (this.staticRoomsCheck[index].children.length === data.saleRooms.length) {
        this.staticRoomsCheck[index].parent = true
        this.numArrayZero++
        if (this.numArrayZero === this.staticRoomsCheck.length) this.settingRoomcheckAll = true
      } else {
        this.numArrayZero--
        this.settingRoomcheckAll = false
        this.staticRoomsCheck[index].parent = false
      }
      this.saleRoomPopover = this.staticRoomsCheck[index].children
    },
    handleCheckAllChange (val) {
      if (val) {
        this.addRoomData.forEach(item => {
          this.addRoomCheckArray.push(item.id)
        })
        this.addRoomCheck = true
      } else {
        this.addRoomCheckArray = []
        this.addRoomCheck = false
      }
      this.isIndeterminate = false
    },
    handleCheckedRoomDataChange (value) {
      let checkedCount = value.length
      this.checkAll = checkedCount === this.addRoomData.length
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.addRoomData.length
    },
    handleRoomSizeChange (val) {
      this.RoomPageSize = val
      this.defaultValue.pageSize = val
      getProductQuery(this.defaultValue).then(res => {
        this.RoomtableData = res.data.staticRoomEntities
      })
    },
    handleRoomCurrentChange (val) {
      this.RoomCurrentPage = val
      this.defaultValue.pageNum = val
      getProductQuery(this.defaultValue).then(res => {
        this.RoomtableData = res.data.staticRoomEntities
      })
    },
    handleSelectionChange () {}
  }
}
</script>

<style lang="scss">
.down-style {
    color: #abb7c3;
}
.up-style {
    background-color: #f6f6f6;
}
  .warpper-first, .warpper-second, .warpper-third {
        margin: 0;
        position: relative;
        border-radius: 3px;
        .closed, .manchu {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 12px;
        width: 16px;
        height: 16px;
        line-height: 16px;
        color: #fff;
        }
        .closed {
            background-color: #ff9913;
        }
        .manchu {
            background-color: #f2665d;
        }
    }
    .warpper-first, .warpper-second, .warpper-third {
        border: 1px solid transparent;
    }
    .warpper-first:hover {
        border: 1px solid #f2665d;
    }
    .warpper-second:hover {
        border: 1px solid #ff9913;
    }
    .warpper-third:hover {
        border: 1px solid #45a2ff;
    }
    #inventory-management .room-name .el-input__inner {
        line-height: 30px;
        height: 30px;
    }
   #inventory-management  .select-day .el-input input {
       line-height: 30px;
       height: 30px;
   }
  #inventory-management {
      margin-top: 6px;
      .check-all-week, .check-week-right {
          float: left;
      }
      .check-all-week {
          margin-right: 10px;
      }
      .edit-sale-room .item-style .el-form-item__label, .edit-sale-room .first-input .el-form-item__label, .edit-sale-room .select-day .el-form-item__label {
          width: 60px;
          line-height: 30px;
          height: 30px;
      }
      .el-dialog__body {
          .el-form-item__label {
              width: 60px;
          }
      }
      .price-radio {
          .el-form-item__content {
              line-height: 2.8;
          }
      }
      .calendar-list {
          .calendar-header {
              padding: 11px 0;
              background-color: rgb(238, 241, 248);
              .calendar-header-warpper {
                  overflow: hidden;
                  .item {
                      margin-left: 1.3%;
                      width: 8.16%;
                      float: left;
                      label {
                          font-size: 12px;
                      }
                  }
              }
          }
          .calendar-body {
              width: 100%;
              .calendar-body-warpper {
                  width: inherit;
                  .calendar-warpper-content {
                      width: inherit;
                      .calendar-content {
                          overflow: hidden;
                          width: inherit;
                          border-bottom: 1px solid #f6f6f6;
                          .calendar-content-module {
                              overflow: hidden;
                            .el-checkbox__label {
                                font-size: 12px;
                            }    
                            .physics, .date-information, .operation {
                                float: left;
                            }
                            .physics {
                                margin-left: 1.3%;
                                width: 8.27%;
                                padding-top: 10px;
                                label, button {
                                    font-size: 12px;
                                }
                                button {
                                    padding: 0;
                                    margin-left: 17%;
                                }
                            }
                            .date-information {
                                width: 90%;
                                min-height: 80px;
                                .date-warpper {
                                    overflow: hidden;
                                    .sale-room-title, .sale-date {
                                            float: left;
                                        }
                                        .sale-room-title {
                                            text-align: center;
                                            width: 100%;
                                            font-size: 12px;
                                            button  {
                                                font-size: 12px;
                                                padding: 0;
                                            }
                                            .sale-room-title-item {
                                                width: 100%;
                                                overflow: hidden;
                                                .sale-title-content {
                                                    margin-top: 10px;
                                                    width: 10.575%;
                                                    float: left;
                                                    .el-checkbox-group {
                                                        text-align: left;
                                                        margin-left: 13.3%;
                                                    }
                                                    label {
                                                        .el-checkbox__label {
                                                            max-width: 100%;
                                                            white-space: normal;
                                                            text-overflow: ellipsis;
                                                            overflow: hidden;
                                                            text-align: center;
                                                            line-height: 1;
                                                        }
                                                    }
                                                    button {
                                                        margin-right: 26.3%;
                                                    }
                                                }
                                                .sale-date {
                                                    width: 75%;
                                                    .item {
                                                        float: left;
                                                        width: 14.1%;
                                                        text-align: left;
                                                        font-size: 12px;
                                                        label {
                                                            font-size: 12px;
                                                        }
                                                        .item-content {
                                                            padding: 0 20px;
                                                            .item-child {
                                                                padding: 10px 0;
                                                                .item-text {
                                                                    width: 60%;
                                                                    text-align: center;
                                                                }
                                                            }
                                                        }
                                                        .red {
                                                            color: red;
                                                        }
                                                    }
                                                }
                                                .operation {
                                                    text-align: left;
                                                    width: 14.38%;
                                                    padding-top: 5px;
                                                    line-height: 87px;
                                                    button {
                                                        font-size: 12px;
                                                        padding: 0;
                                                        margin-left: 7%;
                                                    }
                                                }
                                            }
                                        }
                                }
                            }
                          }
                      }
                  }
              }
          }
          .calendar-foot {}
      }
      .warpper .titleBtn .btn .amount {
        overflow: hidden;
        float: left;
            .el-input {
                width: 80px;
            }
      }
     .warpper .titleBtn .btn .amout-select {
        overflow: hidden;
        float: left;
        width: 70px;
        margin-right: 10px;
        .el-select {
            width: inherit;
            .el-input {
                width: inherit;
                .el-input__inner {
                    height: 34px;
                    line-height: 34px;
                }
            }
        }
    }
      .add-sale-room, .edit-room {
          .select-width {
              .el-input {
                  width: 100px;
              }
          }
          .time-select {
              .el-form-item__content {
                  line-height: 3;
              }
              .el-form-item .el-form-item__content .el-input {
                  width: 70px;
              }
              .el-select {
                  float: left;
                  width: 70px;
              }
          }
          .big-num {
              position: absolute;
              right: 6%;
              top: 0;
              label {
                  font-size: 12px;
                  color: red;
              }
          }
          .add-radio {
              .el-form-item__content {
                  line-height: 2.8;
              }
          }
          .el-radio__label {
              font-size: 12px;
          }
          .el-textarea {
              width: 59%;
              .el-textarea__inner {
                  font-size: 12px;
              }
          }
         .el-form-item__label {
             width: 95px;
         }
         .room-name .el-form-item .el-form-item__content .el-input .el-input__inner {
             width: 200px;
         }
      }
      .dialog-footer {
          text-align: center;
      }
      .batch-edit {
          .el-dialog__wrapper {
              .el-dialog {
                max-height: 600px;
                overflow: auto;
                .el-dialog__body {
                    padding: 5px 20px;
                    .el-form-item__label {
                        width: 60px;
                    }
                }
              }
          }
      }
      .room-name {
          overflow: auto;
          max-height: 300px;
          .el-input__inner {
              width: 400px;
          }
      }
      .batch-l {
          display: inline-block;
          margin-left: 60px;
          .batch-edit {
              float: left;
              margin-right: 50px;
              .line {
                  width: 10px;
                  margin-right: 5px;
              }
            .el-select {
                width: 70px;
                margin-right: 5px;
                .el-input {
                    width: inherit;
                }
            }
            .el-input {
                width: 70px;
                input {
                    height: 30px;
                    line-height: 30px;
                }
            }
        }
      }
      .el-table td, .el-table th.is-leaf {
          text-align: center;
      }
      .el-dialog__header {
        text-align: left;
        background-color: rgb(243, 245, 249);
      }
      .el-select {
          width: 100px;
          .el-input {
              input {
                  height: 30px;
                  line-height: 30px;
              }
          }
      }
      .el-pagination {
          .el-pagination__jump {
              .el-input {
                  input {
                    height: 32px;
                    line-height: 32px;
                  }
              }
          }
      }
      .room-content {
          position: relative;
          button {
              font-size: 12px;
              padding: 0;
          }
          .checkbox-select {
              position: absolute;
              top: 35%;
              left: 10%;
          }
          
      }
      .content {
          padding: 0 20px;
      }
    .el-table td {
        padding: 0;
    }
      .warpper {
          margin-bottom: 20px;
          .titleBtn {
            float: left;
            .el-dialog__header {
                .el-dialog__headerbtn {
                    border: none;
                }
            }
            .btn {
                button {
                    padding: 8px 15px;
                    color: #45a2ff;
                    border: 1px solid #45a2ff;  
                    font-size: 12px;
                    margin-left: 0;
                }
                .add-room-warpper, .patch-edit {
                    float: left;
                    margin-right: 5px;
                }
                .add-room-warpper {
                    .el-dialog__body {
                        padding: 10px 20px 30px 20px;
                    }
                    .add-check {
                        width: 25%;
                        float: left;
                    }
                }
            }
        }
        .calendar {
            float: right;
            overflow: hidden;
            .select, .left-btn, .right-btn, .date {
                float: left;
                button {
                    font-size: 12px;
                }
            }
            .date {
                .el-date-editor {
                    .el-input__prefix {
                        .el-input__icon {
                            line-height: 32px;
                        }
                    }
                }
            }
            .select {
                width: 70px;
                margin-right: 20px;
                .el-select {
                    width: inherit;
                    .el-input--suffix {
                        width: inherit;
                        input {
                            width: inherit;
                        }
                    }
                }
            }
            .el-button {
                padding: 8px 16px;
            }
            .left-btn {
                margin-right: 20px;
            }
            .right-btn {
                margin-left: 20px;
            }
        }
      }
  }
.select-warpper {
    .select-day {
      margin: 0 0 20px 0;
      position: relative;
       .addBtn {
          position: absolute;
          top: 60%;
          left: 70%;
          button {
              font-size: 12px;
          }
          .btn-left, .btn-right {
              float: left;
          }
          .btn-right {
              margin-left: 10px;
          }
      }
      .el-checkbox__label {
          font-size: 12px;
      }
      .checkbox-group {
          line-height: 34px;
      }
      .el-input__icon {
          line-height: 34px;
      }
      .el-form-item__label {
          line-height: 34px;
      }
      .el-checkbox-group {
          line-height: 34px;
      }
  }
}
  

  .room-check {
      width: 50%;
      float: left;
      margin-bottom: 12px;
      .el-checkbox__label {
          font-size: 12px;
      }
      .room-check-child, .room-check-all {
          float: left;
      }
      .room-check-all {
          width: 25%;
          margin-left: 13.5%;
      }
      .el-checkbox+.el-checkbox {
          margin-left: 0;
      }
      .room-check-child {
          .el-checkbox-group {
              .el-checkbox {
                  display: block;
              }
          }
      }
  }
  .edit-sale-room {
      .first-input {
            .el-input {
                width: 300px;
                input {
                    width: 300px!important;
                }
            }
        }
        .inputs {
            width: 27%;
            float: left;
            .input-style {
                .el-select {
                    width: 80px!important;
                    margin-right: 0!important;    
                }
            }
            .line {
                text-align: center;
            }
            .el-form-item__label {
                width: 50px!important;
            }
            .el-form-item__content {
                line-height: 2.8;
            }
            .el-form-item .el-form-item__content .el-input, .edit-sale-room .item .el-form-item .el-form-item__content .el-input {
                width: 80px!important;
            }
        }
        .input {
            width: 16%;
            float: left;
            .input-style {
                .el-select {
                    width: 80px!important;
                    margin-right: 0!important;    
                }
            }
            .el-form-item__label {
                width: 50px!important;
            }
            .el-form-item__content {
                line-height: 2.8;
            }
            .el-form-item .el-form-item__content .el-input, .edit-sale-room .item .el-form-item .el-form-item__content .el-input {
                width: 80px!important;
            }
        }
        .select {
            float: left;
            width: 13%;
            .el-form-item__content {
                line-height: 2.8;
            }
        }
        .select-week {
            .el-checkbox__label {
                font-size: 12px;
            }
            .el-checkbox+.el-checkbox {
                margin-left: 10px;
            }
            .el-checkbox-group {
                line-height: 2.8;
            }
        }
        .item-style, .first-input, .select-day {
            .el-form-item__label {
                width: 108px;
            }
        }
        .item-style, .item {
            .el-form-item .el-form-item__content .el-input {
                width: 100px;
            }
            .el-form-item__content {
                line-height: 2.8;
            }
            .el-radio__label {
                font-size: 12px;
            }
        }
      .el-dialog__wrapper {
          .el-dialog {
              .el-dialog__body {
                  padding: 20px 20px 30px 20px;
              }
          }
      }
  }
  
</style>
